
#ifndef EVENT_LIST_QUEUE_H
#define EVENT_LIST_QUEUE_H

#include <list>
#include "base/Lock.h"
#include "base/SimpleEvent.h"
enum EventType
{
	CONNECTION_WORK_NONE,
	CONNECTION_WORK_CPU,
	CONNECTION_WORK_READ_ERROR
};


class EventList{
public:
	EventList()
		:type(CONNECTION_WORK_NONE)
        ,rtsp_this(NULL)
	{
	}

	~EventList(){}

	EventType type;

    void * rtsp_this;

};



class EventListQueue
{
public:
	EventListQueue();
	~EventListQueue();
	bool enQueue(const EventList & event_l);
	bool deQueue(EventList&  event_l, bool block);

	bool DoQueueQuit();

public:
	std::list<EventList> event_list;

    base::Lock lock_event;
	
    //base::SimpleEvent m_event;
};

#endif
